package com.pig4cloud.pig.module.api.entity.wx;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.pig4cloud.pig.common.core.annotation.Excel;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 微信支付的动账流水记录对象 wx_pay_transaction
 *
 * @author ruoyi
 * @date 2022-07-18
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("wx_pay_transaction")
public class WxPayTransaction implements Serializable {

    private static final long serialVersionUID = 1L;


    /**
     * $column.columnComment
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

	/**
	 *  本平台 流水号
	 */
	private String transactionNo;

	/**
	 *  小区名称
	 */
	private Integer estateId;

	/**
	 *  小区名称
	 */
	private String estateName;

    /**
     * 支付方式    1 - 微信 2 - 农商行
     */
    private Integer payType;

    /**
     * 微信商家订单号
     */
    @Excel(name = "微信商家订单号")
    private String outTradeNo;

    /**
     * 微信返回的 订单id
     */
    private String transactionId;

    /**
     * 费用类型   product - 购买商品
     */
    private String feeType;


	@Excel(name = "动账类型")
	@TableField(exist = false)
	private String feeTypeStr;

    /**
     * 动账金额
     */
	@Excel(name = "动账金额")
    private BigDecimal totalMoney;

    /**
     * 微信用户id
     */
    private Integer userId;

    /**
     * 微信昵称
     */
	@Excel(name = "微信昵称")
    private String nickName;

    private Integer merId;
    private String merName;


    /**
     * 进账-出账类型 0 - 出 - 1 - 进
     */
    private Integer inOrOut;


	@Excel(name = "进出账")
	@TableField(exist = false)
	private String inOrOutStr;

    /**
     * 动账时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;


	/**
	 *  支付商户id
	 */
	private Integer payPlatformId;



	@Excel(name = "动账时间")
    @TableField(exist = false)
	private String createTimeStr;

    /**
     * 备注信息
     */
	@Excel(name = "备注信息")
    private String remark;

	@TableField(exist = false)
	private String beginDate;

	@TableField(exist = false)
	private String endDate;


	@TableField(exist = false)
	private String faceUrl;
}
